package com.example.qxfw.ldyj.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.qxfw.common.entity.qx.Raiden;
import com.example.qxfw.ldyj.mapper.RaidenMapper;
import com.example.qxfw.ldyj.service.JckbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;

@Service
public class JckbServiceImpl implements JckbService {
    @Autowired
    private RaidenMapper raidenMapper;

    @Override
    public List<Raiden> SelectByTimePeriodOfRaiden(Timestamp observetimeStart, Timestamp observetimeEnd) {
        return raidenMapper.selectList(new LambdaQueryWrapper<Raiden>()
        .between(Raiden::getObservetime, observetimeStart, observetimeEnd));

    }

    @Override
    public String getEarliestTime() {
        return raidenMapper.selectEarliestTime();
    }

    @Override
    public String getLatestTime() {
        return raidenMapper.selectLatestTime();
    }
}
